package zy010;

import java.io.File;

public class zy1 {
	public static void main(String[] args) {
		File d=new File("e:\\abc");
		boolean delete = deleteDir(d);
		System.out.println(delete);
	}
	private static boolean deleteDir(File d) {
		File[] listFiles = d.listFiles();
		if(listFiles != null){
			for(File file:listFiles){
				if(file.isDirectory()){
					deleteDir(file);
				}else{
					file.delete();
				}
			}
		}
		boolean delete = d.delete();
		return delete;
	}
}
